package code.remote.request {

import code.remote.ResultErrorContainer;
import code.remote.ResultErrorReceivedEvent;

import mx.rpc.events.ResultEvent;
	

[Event(name="resultErrorReceived",type="code.remote.ResultErrorReceivedEvent")]
internal class AbstractActionRequest extends AbstractRequest {
	
	public function AbstractActionRequest(requestType: String) {
		super(requestType);
	}
	
	protected override function onResult(event: ResultEvent): void {
		// trace(ObjectUtil.toString(event.result));
		const errorContainer: ResultErrorContainer = ResultErrorContainer.newByResultEvent(event);
		
		this.dispatchEvent(new ResultErrorReceivedEvent(event, errorContainer));
	}

}
}